//
//  cCXMPPTool.h
//  cyChat
//
//  Created by 楼楚 on 15/12/5.
//  Copyright © 2015年 Chu Lou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Singleton.h"
#import "XMPPFramework.h"

typedef enum {
    XMPPResultTypeLoginSuccess,//登录成功
    XMPPResultTypeLoginFailue,//登录失败
    XMPPResultTypeRegisterSuccess,//登录成功
    XMPPResultTypeRegisterFailue,//登录失败
    XMPPResultTypeNetErr//网络不给力
}XMPPResultType;
typedef void (^XMPPResultBlock)(XMPPResultType type);//XMPP请求结果的Block


@interface cCXMPPTool : NSObject
singleton_interface(cCXMPPTool)
@property (nonatomic,strong,readonly) XMPPStream *xmppStream;
@property (nonatomic,strong,readonly) XMPPvCardTempModule *vCard;//电子名片
@property (nonatomic,strong,readonly) XMPPRosterCoreDataStorage *rosterStorge;//   花名册数据储存
@property (nonatomic,strong,readonly) XMPPRoster *roster;//    花名册模块
@property (nonatomic,strong,readonly) XMPPMessageArchivingCoreDataStorage *msgStorge;//聊天的数据储存




@property (assign,nonatomic,getter=isRegisterOperation ) BOOL registerOperation;

/*
 用户注销
 */

- (void)xmppUserlogout;

/*
 用户登录
 */
- (void) xmppUserLogin:(XMPPResultBlock)resultBlock;

/*
 用户注册
 */
- (void) xmppUserRegister:(XMPPResultBlock)resultBlock;
@end
